// template/share/share.js
const onCloseShare = function() {
  this.setData({
    share: {
      isShow: false
    }
  })
}
const onShowShare = function() {
  this.setData({
    share: {
      isShow: true
    }
  })
}
const onSelectShare = function(e) {
  this.onCloseShare();
  var index = e.currentTarget.dataset.index || 0;
  var param = e.currentTarget.dataset.param;
  if (e.detail.name == '保存分享图') {
    wx.navigateTo({
      url: '/pages/share/share?index=' + index + '&param=' + param,
    })
  }
}
module.exports = {
  onCloseShare: onCloseShare,
  onShowShare: onShowShare,
  onSelectShare: onSelectShare
}